import List from "./data";
import { randomColor } from 'src/utils/color'
import './barrage.less'

export function BarrageShow() {


  return <div class={"barrage-show"}>
    {Array.from({ length: List.length }, (_, i) => {
      const item = List[i];
      return <div key={i + 'bar'} class={"barrage-show-item"} style={{
        left: 80 * i + 'px',
        top: (i + 1) * 80 + 'px',
        backgroundImage: `linear-gradient(to right, ${randomColor()}, ${randomColor()})`
      }}>
        {item}
      </div>
    })}
  </div >
}